package com.jeethink.web.controller.demo.controller;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeethink.common.core.controller.BaseController;
import com.jeethink.common.core.page.PageDomain;
import com.jeethink.common.core.page.TableDataInfo;
import com.jeethink.common.core.page.TableSupport;
import com.jeethink.common.utils.DateUtils;
import com.jeethink.common.utils.StringUtils;

/**
 * 表格相关
 * 
 * @author jeethink  官方网站:www.jeethink.vip
 */
@Controller
@RequestMapping("/demo/table")
public class DemoTableController extends BaseController
{
    private String prefix = "demo/table";

    private final static List<TaskModel> tasks = new ArrayList<TaskModel>();
    {
        tasks.add(new TaskModel(01, "3月电子集团创新项目情况表", "电子集团创新项目情况表", "2022/03/01 - 2022/04/15", "0","" ,"本企业名称", "0", "0"));
        tasks.add(new TaskModel(02, "2月电子集团创新项目情况表", "电子集团创新项目情况表", "2022/03/01 - 2022/04/15", "1","" ,"本企业名称", "1", "2"));
        tasks.add(new TaskModel(03, "1月电子集团创新项目情况表", "电子集团创新项目情况表", "2022/03/01 - 2022/04/15", "2","" ,"本企业名称", "0", "0"));
        tasks.add(new TaskModel(04, "5月电子集团创新项目情况表", "电子集团创新项目情况表", "2022/03/01 - 2022/04/15", "0","" ,"本企业名称", "0", "3"));
        tasks.add(new TaskModel(05, "6月电子集团创新项目情况表", "电子集团创新项目情况表", "2022/03/01 - 2022/04/15", "3","" ,"本企业名称", "1", "1"));
    }

    private final static List<ReportModel> reports = new ArrayList<ReportModel>();
    {
        reports.add(new ReportModel(1, "广东省电子信息产业集团有限公司", "深圳市南和移动通信科技股份有限公司", "3G老人定位器", "0","0","无","此项目是一款定位器产品，只有几个快捷按键和SOS键，没有屏幕显示，配合后台使用，通过后台推送快捷拨号的电话号码和天气预报按侧键播报，并可以上传位置信息，可以在后台服务器查看定位器的位置和运动轨迹。并可按SOS按键主动报警，通知快捷联系人 ", "无","2016年2至2016年12月","0","0","预计未来市场前景更加看好，未来两年年销售量将突破30万台，产值达9000万元，利税可达200万元。"));
        reports.add(new ReportModel(2, "广东省电子信息产业集团有限公司", "深圳市南和移动通信科技股份有限公司", "3G老人定位器", "0","0","无","无", "无","2016年2至2016年12月","0","0","无"));
        reports.add(new ReportModel(3,
                "<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">",
                "<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">",
                "<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">",
                "<select class=\"form-control\" name=\"\">\n" +
                        "\t\t\t\t\t\t\t\t\t<option>选项 1</option>\n" +
                        "\t\t\t\t\t\t\t\t\t<option>选项 2</option>\n" +
                        "\t\t\t\t\t\t\t\t</select>",
                "<select class=\"form-control\" name=\"\">\n" +
                        "\t\t\t\t\t\t\t\t\t<option>部门 1</option>\n" +
                        "\t\t\t\t\t\t\t\t\t<option>部门 2</option>\n" +
                        "\t\t\t\t\t\t\t\t</select>",
                "\t\t\t\t\t\t\t\t<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">\n",
                "\t\t\t\t\t\t\t\t<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">\n",
                "\t\t\t\t\t\t\t\t<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">\n",
                "<input type=\"text\" class=\"form-control\" value=\"2018-04-20\">---<input type=\"text\" class=\"form-control\" value=\"2018-04-20\">",
                "\t<select class=\"form-control\" name=\"\">\n" +
                        "\t\t\t\t\t\t\t\t\t<option>完成</option>\n" +
                        "\t\t\t\t\t\t\t\t\t<option>未完成</option>\n" +
                        "\t\t\t\t\t\t\t\t</select>",
                "<select class=\"form-control\" name=\"\">\n" +
                        "\t\t\t\t\t\t\t\t\t<option>是</option>\n" +
                        "\t\t\t\t\t\t\t\t\t<option>否</option>\n" +
                        "\t\t\t\t\t\t\t\t</select>",
                "<input type=\"text\" name=\"\" class=\"form-control\" placeholder=\"请输入文本\">"));
    }

    private final static List<UserTableModel> users = new ArrayList<UserTableModel>();
    {
        users.add(new UserTableModel(1, "1000001", "测试1", "0", "15888888888", "jt@qq.com", 150.0, "0"));
        users.add(new UserTableModel(2, "1000002", "测试2", "1", "15666666666", "jt@qq.com", 180.0, "1"));
        users.add(new UserTableModel(3, "1000003", "测试3", "0", "15666666666", "jt@qq.com", 110.0, "1"));
        users.add(new UserTableModel(4, "1000004", "测试4", "1", "15666666666", "jt@qq.com", 220.0, "1"));
        users.add(new UserTableModel(5, "1000005", "测试5", "0", "15666666666", "jt@qq.com", 140.0, "1"));
        users.add(new UserTableModel(6, "1000006", "测试6", "1", "15666666666", "jt@qq.com", 330.0, "1"));
        users.add(new UserTableModel(7, "1000007", "测试7", "0", "15666666666", "jt@qq.com", 160.0, "1"));
        users.add(new UserTableModel(8, "1000008", "测试8", "1", "15666666666", "jt@qq.com", 170.0, "1"));
        users.add(new UserTableModel(9, "1000009", "测试9", "0", "15666666666", "jt@qq.com", 180.0, "1"));
        users.add(new UserTableModel(10, "1000010", "测试10", "0", "15666666666", "jt@qq.com", 210.0, "1"));
        users.add(new UserTableModel(11, "1000011", "测试11", "1", "15666666666", "jt@qq.com", 110.0, "1"));
        users.add(new UserTableModel(12, "1000012", "测试12", "0", "15666666666", "jt@qq.com", 120.0, "1"));
        users.add(new UserTableModel(13, "1000013", "测试13", "1", "15666666666", "jt@qq.com", 380.0, "1"));
        users.add(new UserTableModel(14, "1000014", "测试14", "0", "15666666666", "jt@qq.com", 280.0, "1"));
        users.add(new UserTableModel(15, "1000015", "测试15", "0", "15666666666", "jt@qq.com", 570.0, "1"));
        users.add(new UserTableModel(16, "1000016", "测试16", "1", "15666666666", "jt@qq.com", 260.0, "1"));
        users.add(new UserTableModel(17, "1000017", "测试17", "1", "15666666666", "jt@qq.com", 210.0, "1"));
        users.add(new UserTableModel(18, "1000018", "测试18", "1", "15666666666", "jt@qq.com", 340.0, "1"));
        users.add(new UserTableModel(19, "1000019", "测试19", "1", "15666666666", "jt@qq.com", 160.0, "1"));
        users.add(new UserTableModel(20, "1000020", "测试20", "1", "15666666666", "jt@qq.com", 220.0, "1"));
        users.add(new UserTableModel(21, "1000021", "测试21", "1", "15666666666", "jt@qq.com", 120.0, "1"));
        users.add(new UserTableModel(22, "1000022", "测试22", "1", "15666666666", "jt@qq.com", 130.0, "1"));
        users.add(new UserTableModel(23, "1000023", "测试23", "1", "15666666666", "jt@qq.com", 490.0, "1"));
        users.add(new UserTableModel(24, "1000024", "测试24", "1", "15666666666", "jt@qq.com", 570.0, "1"));
        users.add(new UserTableModel(25, "1000025", "测试25", "1", "15666666666", "jt@qq.com", 250.0, "1"));
        users.add(new UserTableModel(26, "1000026", "测试26", "1", "15666666666", "jt@qq.com", 250.0, "1"));
    }

    private final static List<RewardModel> rewards = new ArrayList<RewardModel>();
    {
        rewards.add(new RewardModel(1,"2011年","中国专利奖","金奖","多声道数字音频编码设备及其办法"));
        rewards.add(new RewardModel(2,"2010年","信息产业重大技术发明奖","广州市唯一一项","DRA多声道数字音频编解码关键技术研发及其产业化"));
        rewards.add(new RewardModel(3,"2010年","广东省标准创新贡献奖","一等奖","多声道数字音频编解码技术规范"));
        rewards.add(new RewardModel(4,"2011年","广东专利奖","金奖","多声道数字音频编码设备及其方法"));
        rewards.add(new RewardModel(5,"2012年","广东省科学技术奖","一等奖","DRA多声道数字音频编解码技术应用研发及标准化"));
    }
    /**
     * 搜索相关
     */
    @GetMapping("/search")
    public String search()
    {
        return prefix + "/search";
    }

    /**
     * 数据汇总
     */
    @GetMapping("/footer")
    public String footer()
    {
        return prefix + "/footer";
    }


    /**
     * 数据汇总2
     */
    @GetMapping("/footer2")
    public String footer2()
    {
        return prefix + "/footer2";
    }

    /**
     * 任务填报
     */
    @GetMapping("/filling")
    public String filling()
    {
        return prefix + "/filling";
    }


    /**
     * 组合表头
     */
    @GetMapping("/groupHeader")
    public String groupHeader()
    {
        return prefix + "/groupHeader";
    }

    /**
     * 表格导出
     */
    @GetMapping("/export")
    public String export()
    {
        return prefix + "/export";
    }

    /**
     * 翻页记住选择
     */
    @GetMapping("/remember")
    public String remember()
    {
        return prefix + "/remember";
    }

    /**
     * 跳转至指定页
     */
    @GetMapping("/pageGo")
    public String pageGo()
    {
        return prefix + "/pageGo";
    }

    /**
     * 自定义查询参数
     */
    @GetMapping("/params")
    public String params()
    {
        return prefix + "/params";
    }

    /**
     * 多表格
     */
    @GetMapping("/multi")
    public String multi()
    {
        return prefix + "/multi";
    }

    /**
     * 点击按钮加载表格
     */
    @GetMapping("/button")
    public String button()
    {
        return prefix + "/button";
    }

    /**
     * 直接加载表格数据
     */
    @GetMapping("/data")
    public String data(ModelMap mmap)
    {
        mmap.put("users", users);
        return prefix + "/data";
    }

    /**
     * 表格冻结列
     */
    @GetMapping("/fixedColumns")
    public String fixedColumns()
    {
        return prefix + "/fixedColumns";
    }

    /**
     * 自定义触发事件
     */
    @GetMapping("/event")
    public String event()
    {
        return prefix + "/event";
    }

    /**
     * 表格细节视图
     */
    @GetMapping("/detail")
    public String detail()
    {
        return prefix + "/detail";
    }

    /**
     * 表格父子视图
     */
    @GetMapping("/child")
    public String child()
    {
        return prefix + "/child";
    }

    /**
     * 表格图片预览
     */
    @GetMapping("/image")
    public String image()
    {
        return prefix + "/image";
    }

    /**
     * 动态增删改查
     */
    @GetMapping("/curd")
    public String curd()
    {
        return prefix + "/curd";
    }

    /**
     * 表格拖拽操作
     */
    @GetMapping("/reorder")
    public String reorder()
    {
        return prefix + "/reorder";
    }

    /**
     * 表格列宽拖动
     */
    @GetMapping("/resizable")
    public String resizable()
    {
        return prefix + "/resizable";
    }

    /**
     * 表格行内编辑操作
     */
    @GetMapping("/editable")
    public String editable()
    {
        return prefix + "/editable";
    }

    /**
     * 主子表提交
     */
    @GetMapping("/subdata")
    public String subdata()
    {
        return prefix + "/subdata";
    }

    /**
     * 表格自动刷新
     */
    @GetMapping("/refresh")
    public String refresh()
    {
        return prefix + "/refresh";
    }

    /**
     * 表格打印配置
     */
    @GetMapping("/print")
    public String print()
    {
        return prefix + "/print";
    }

    /**
     * 表格标题格式化
     */
    @GetMapping("/headerStyle")
    public String headerStyle()
    {
        return prefix + "/headerStyle";
    }

    /**
     * 表格其他操作
     */
    @GetMapping("/other")
    public String other()
    {
        return prefix + "/other";
    }

    @PostMapping("/list4")
    @ResponseBody
    public TableDataInfo list4(RewardModel rewardModel)
    {
        TableDataInfo rspData = new TableDataInfo();
        List<RewardModel> rewardList = new ArrayList<RewardModel>(Arrays.asList(new RewardModel[rewards.size()]));
        Collections.copy(rewardList, rewards);
        // 查询条件过滤
        if (StringUtils.isNotEmpty(rewardModel.getDemoName()))
        {
            rewardList.clear();
            for (RewardModel reward : rewards)
            {
                if (reward.getDemoName().equals(reward.getDemoName()))
                {
                    rewardList.add(reward);
                }
            }
        }
        PageDomain pageDomain = TableSupport.buildPageRequest();
        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
        {
            rspData.setRows(rewardList);
            rspData.setTotal(rewardList.size());
            return rspData;
        }
        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
        Integer pageSize = pageDomain.getPageNum() * 10;
        if (pageSize > rewardList.size())
        {
            pageSize = rewardList.size();
        }
        rspData.setRows(rewardList.subList(pageNum, pageSize));
        rspData.setTotal(rewardList.size());
        return rspData;
    }

    /**
     * 查询数据
     */
    @PostMapping("/list3")
    @ResponseBody
    public TableDataInfo list3(ReportModel reportModel)
    {
        TableDataInfo rspData = new TableDataInfo();
        List<ReportModel> reportList = new ArrayList<ReportModel>(Arrays.asList(new ReportModel[reports.size()]));
        Collections.copy(reportList, reports);
        // 查询条件过滤
        if (StringUtils.isNotEmpty(reportModel.getProjectName()))
        {
            reportList.clear();
            for (ReportModel report : reports)
            {
                if (report.getProjectName().equals(report.getProjectName()))
                {
                    reportList.add(report);
                }
            }
        }
        PageDomain pageDomain = TableSupport.buildPageRequest();
        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
        {
            rspData.setRows(reportList);
            rspData.setTotal(reportList.size());
            return rspData;
        }
        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
        Integer pageSize = pageDomain.getPageNum() * 10;
        if (pageSize > reportList.size())
        {
            pageSize = reportList.size();
        }
        rspData.setRows(reportList.subList(pageNum, pageSize));
        rspData.setTotal(reportList.size());
        return rspData;
    }

    /**
     * 查询数据
     */
    @PostMapping("/list2")
    @ResponseBody
    public TableDataInfo list(TaskModel taskModel)
    {
        TableDataInfo rspData = new TableDataInfo();
        List<TaskModel> taskList = new ArrayList<TaskModel>(Arrays.asList(new TaskModel[tasks.size()]));
        Collections.copy(taskList, tasks);
        // 查询条件过滤
        if (StringUtils.isNotEmpty(taskModel.getTaskName()))
        {
            taskList.clear();
            for (TaskModel task : tasks)
            {
                if (task.getTaskName().equals(taskModel.getTaskName()))
                {
                    taskList.add(task);
                }
            }
        }
        PageDomain pageDomain = TableSupport.buildPageRequest();
        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
        {
            rspData.setRows(taskList);
            rspData.setTotal(taskList.size());
            return rspData;
        }
        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
        Integer pageSize = pageDomain.getPageNum() * 10;
        if (pageSize > taskList.size())
        {
            pageSize = taskList.size();
        }
        rspData.setRows(taskList.subList(pageNum, pageSize));
        rspData.setTotal(taskList.size());
        return rspData;
    }

    /**
     * 查询数据
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(UserTableModel userModel)
    {
        TableDataInfo rspData = new TableDataInfo();
        List<UserTableModel> userList = new ArrayList<UserTableModel>(Arrays.asList(new UserTableModel[users.size()]));
        Collections.copy(userList, users);
        // 查询条件过滤
        if (StringUtils.isNotEmpty(userModel.getUserName()))
        {
            userList.clear();
            for (UserTableModel user : users)
            {
                if (user.getUserName().equals(userModel.getUserName()))
                {
                    userList.add(user);
                }
            }
        }
        PageDomain pageDomain = TableSupport.buildPageRequest();
        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
        {
            rspData.setRows(userList);
            rspData.setTotal(userList.size());
            return rspData;
        }
        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
        Integer pageSize = pageDomain.getPageNum() * 10;
        if (pageSize > userList.size())
        {
            pageSize = userList.size();
        }
        rspData.setRows(userList.subList(pageNum, pageSize));
        rspData.setTotal(userList.size());
        return rspData;
    }

    /**
     * 数据汇总3
     */
    @GetMapping("/footer3")
    public String footer3()
    {
        return prefix + "/footer3";
    }

    /**
     * 数据汇总4
     */
    @GetMapping("/footer4")
    public String footer4()
    {
        return prefix + "/footer4";
    }

    @GetMapping("/footer5")
    public String footer5()
    {
        return prefix + "/footer5";
    }

    @GetMapping("/footer3edit")
    public String footer3edit()
    {
        return prefix + "/footer3edit";
    }
}

class  TaskModel{

    /** 任务序号 */
    private int taskId;

    /** 任务名称 */
    private String taskName;

    /** 报表姓名 */
    private String reportName;

    /** 任务时限 */
    private String taskTime;

    /** 任务类型（0月度任务 1季度任务 2年度任务 3临时任务） */
    private String taskType;

    /** 任务附件 */
    private Object taskFile;

    /** 用户余额 */
    private String taskExecutor;

    /** 审核方式（0无需审核 1填报公司审核） */
    private String examineMethod;

    /** 状态（0待填报 1已提交 2已过期 3审批驳回 4待审核） */
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public TaskModel() {
    }

    public TaskModel(int taskId, String taskName, String reportName, String taskTime, String taskType, Object taskFile, String taskExecutor, String examineMethod, String status) {
        this.taskId = taskId;
        this.taskName = taskName;
        this.reportName = reportName;
        this.taskTime = taskTime;
        this.taskType = taskType;
        this.taskFile = taskFile;
        this.taskExecutor = taskExecutor;
        this.examineMethod = examineMethod;
        this.status = status;
        this.createTime = DateUtils.getNowDate();
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getReportName() {
        return reportName;
    }

    public void setReportName(String reportName) {
        this.reportName = reportName;
    }

    public String getTaskTime() {
        return taskTime;
    }

    public void setTaskTime(String taskTime) {
        this.taskTime = taskTime;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public Object getTaskFile() {
        return taskFile;
    }

    public void setTaskFile(Object taskFile) {
        this.taskFile = taskFile;
    }

    public String getTaskExecutor() {
        return taskExecutor;
    }

    public void setTaskExecutor(String taskExecutor) {
        this.taskExecutor = taskExecutor;
    }

    public String getExamineMethod() {
        return examineMethod;
    }

    public void setExamineMethod(String examineMethod) {
        this.examineMethod = examineMethod;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

class ReportModel{

    /** 报表序号 */
    private int reportId;

    /** 所属企业 */
    private String enterpriseName;

    /** 公司名称 */
    private String companyName;

    /** 项目名称 */
    private String projectName;

    /** 项目类别(0自主研发 1外包) */
    private String projectType;

    /** 立项部门(0研发部 1营销部) */
    private String deptName;

    /** 立项文号 */
    private String projectNo;

    /** 项目内容 */
    private String projectContent;

    /** 扶持资金 */
    private String capital;

    /** 项目起止时间 */
    private String projectTime;

    /** 进展情况(0完成) */
    private String status;

    /** 是否验收（0是 1否） */
    private String isCheck;

    /** 预计收益 */
    private String projectIncome;

    public ReportModel() {
    }

    public ReportModel(int reportId, String enterpriseName, String companyName, String projectName, String projectType, String deptName, String projectNo, String projectContent, String capital, String projectTime, String status, String isCheck, String projectIncome) {
        this.reportId = reportId;
        this.enterpriseName = enterpriseName;
        this.companyName = companyName;
        this.projectName = projectName;
        this.projectType = projectType;
        this.deptName = deptName;
        this.projectNo = projectNo;
        this.projectContent = projectContent;
        this.capital = capital;
        this.projectTime = projectTime;
        this.status = status;
        this.isCheck = isCheck;
        this.projectIncome = projectIncome;
    }

    public int getReportId() {
        return reportId;
    }

    public void setReportId(int reportId) {
        this.reportId = reportId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getProjectNo() {
        return projectNo;
    }

    public void setProjectNo(String projectNo) {
        this.projectNo = projectNo;
    }

    public String getProjectContent() {
        return projectContent;
    }

    public void setProjectContent(String projectContent) {
        this.projectContent = projectContent;
    }

    public String getCapital() {
        return capital;
    }

    public void setCapital(String capital) {
        this.capital = capital;
    }

    public String getProjectTime() {
        return projectTime;
    }

    public void setProjectTime(String projectTime) {
        this.projectTime = projectTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(String isCheck) {
        this.isCheck = isCheck;
    }

    public String getProjectIncome() {
        return projectIncome;
    }

    public void setProjectIncome(String projectIncome) {
        this.projectIncome = projectIncome;
    }
}


class RewardModel{
    private Integer id;
    private String rewardTime;
    private String prize;
    private String level;
    private String demoName;

    public RewardModel() {
    }

    public RewardModel(Integer id, String rewardTime, String prize, String level, String demoName) {
        this.id = id;
        this.rewardTime = rewardTime;
        this.prize = prize;
        this.level = level;
        this.demoName = demoName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRewardTime() {
        return rewardTime;
    }

    public void setRewardTime(String rewardTime) {
        this.rewardTime = rewardTime;
    }

    public String getPrize() {
        return prize;
    }

    public void setPrize(String prize) {
        this.prize = prize;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getDemoName() {
        return demoName;
    }

    public void setDemoName(String demoName) {
        this.demoName = demoName;
    }
}

class UserTableModel
{
    /** 用户ID */
    private int userId;

    /** 用户编号 */
    private String userCode;

    /** 用户姓名 */
    private String userName;

    /** 用户性别 */
    private String userSex;

    /** 用户手机 */
    private String userPhone;

    /** 用户邮箱 */
    private String userEmail;

    /** 用户余额 */
    private double userBalance;

    /** 用户状态（0正常 1停用） */
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public UserTableModel()
    {

    }

    public UserTableModel(int userId, String userCode, String userName, String userSex, String userPhone,
            String userEmail, double userBalance, String status)
    {
        this.userId = userId;
        this.userCode = userCode;
        this.userName = userName;
        this.userSex = userSex;
        this.userPhone = userPhone;
        this.userEmail = userEmail;
        this.userBalance = userBalance;
        this.status = status;
        this.createTime = DateUtils.getNowDate();
    }

    public int getUserId()
    {
        return userId;
    }

    public void setUserId(int userId)
    {
        this.userId = userId;
    }

    public String getUserCode()
    {
        return userCode;
    }

    public void setUserCode(String userCode)
    {
        this.userCode = userCode;
    }

    public String getUserName()
    {
        return userName;
    }

    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserSex()
    {
        return userSex;
    }

    public void setUserSex(String userSex)
    {
        this.userSex = userSex;
    }

    public String getUserPhone()
    {
        return userPhone;
    }

    public void setUserPhone(String userPhone)
    {
        this.userPhone = userPhone;
    }

    public String getUserEmail()
    {
        return userEmail;
    }

    public void setUserEmail(String userEmail)
    {
        this.userEmail = userEmail;
    }

    public double getUserBalance()
    {
        return userBalance;
    }

    public void setUserBalance(double userBalance)
    {
        this.userBalance = userBalance;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }
}
